package iit.projects.etaxi.model.entity;

import java.io.Serializable;

public class SendingSms implements Serializable {

	private static final long serialVersionUID = -4364209866895424086L;
	
	/**
	 * <p>Primary Key</p>
	 */
	private Long id;
	
	/**
	 * <p>Message to be sent</p>
	 */
	private String message;
	
	/**
	 * <p>Contact number of the Recepient</p>
	 */
	private String recepient;
	
	/**
	 * <p>Sending SMS type. Ex: Confirmation, Request assignment.</p>
	 */
	private String type;
	
	/**
	 * <p>The Reservation by which this SMS was generated.</p>
	 */
	private Reservation reservation;
	
	/**
	 * <p>Processed status of the SMS</p>
	 */
	private String deliveryStatus = "0";

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getRecepient() {
		return recepient;
	}

	public void setRecepient(String recepient) {
		this.recepient = recepient;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Reservation getReservation() {
		return reservation;
	}

	public void setReservation(Reservation reservation) {
		this.reservation = reservation;
	}

	/**
	 * @return the deliveryStatus
	 */
	public String getDeliveryStatus() {
		return deliveryStatus;
	}

	/**
	 * @param deliveryStatus the deliveryStatus to set
	 */
	public void setDeliveryStatus(String deliveryStatus) {
		this.deliveryStatus = deliveryStatus;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((recepient == null) ? 0 : recepient.hashCode());
		result = prime * result
				+ ((reservation == null) ? 0 : reservation.hashCode());
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SendingSms other = (SendingSms) obj;
		if (recepient == null) {
			if (other.recepient != null)
				return false;
		} else if (!recepient.equals(other.recepient))
			return false;
		if (reservation == null) {
			if (other.reservation != null)
				return false;
		} else if (!reservation.equals(other.reservation))
			return false;
		if (type == null) {
			if (other.type != null)
				return false;
		} else if (!type.equals(other.type))
			return false;
		return true;
	}

}
